<div style="border: 1px solid #cacaca; width:790px;">
<p class="p10 ">
	<b>设置附件权限</b>
</p>
<div class="detaiTab b_t">
	<tbody>
		<form action="<@url value='/accessory/addAccProvine?associatedId=${associatedId }&dataId=${no }'/>" 
			class="action-ajax-form action-ajax-form-valid action-ajax-form-confirm"
			action-ajax-form-confirm-message="确认保存">
			<table border="0" cellpadding="0" cellspacing="0" >
				<tr>
					<td class="bg" align="right" width="16%">省份:</td>
					<td>
						<#list proList as plist>
							<label>
								<input name="provinceCode"  id="provinceCode" 
								<#list selectList as slist>
									<#if slist == plist.provinceCode>
										checked="checked"
									</#if>
								</#list>
								value="${plist.provinceCode}" type="checkbox">
									${plist.provinceName}
							</label>&nbsp;&nbsp;
						</#list>
					</td>
					<!-- <td>
						<select name="provinceCode" id="provinceCode" style="width:150px;">
        					<option  value="">请选择
        					<#list proList as list>
        					<option value="${list.provinceCode}">${list.provinceName}
        					</#list>
        				</select>
					</td> -->
				</tr>
				<tr>
					<td class="bg" align="right" width="16%"></td>
					<td>
						<label><input type="checkbox" name="allChecked" id="allChecked"
						<#if selectList?size == proList?size>
							checked="checked"
						</#if>
						 onclick="DoCheck()"/>全选</label>
					</td>
				</tr>
			</table>
			<div align="center" class="clearfix">
		<input type="submit" value="保存"
						class="btn_auto_30 btn_blue mtb20" />
		</div>
		</form>
	</tbody>
</div>
</div>
<script type="text/javascript">
	function DoCheck(){
		var ch=document.getElementsByName("provinceCode");
		if(document.getElementsByName("allChecked")[0].checked==true){
			for(var i=0;i < ch.length;i++)
			{
				ch[i].checked=true;
			}
		}else{
			for(var i=0;i < ch.length;i++)
			{
				ch[i].checked=false;
			}
		}
	}
</script>